//
//  walletTableViewCell.m
//  ioschishan
//
//  Created by 千翼网络科技 on 2017/7/13.
//  Copyright © 2017年 qianyi. All rights reserved.
//

#import "walletTableViewCell.h"

@implementation walletTableViewCell

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
    
    if (self = [super initWithStyle:style reuseIdentifier:@"identifier"]) {
        
        [self initView];
    }
    return self;
}

#pragma mark ---------------- init -----------------

- (void)initView{
    
    self.backgroundColor = getColor(@"ffffff");
    
    _nameLable = [[UILabel alloc]init];
    _nameLable.text = @"100水滴";
    _nameLable.textColor = getColor(@"4a4a4a");
    _nameLable.textAlignment = NSTextAlignmentLeft;
    _nameLable.font = get4sFont(13);
    [self addSubview:_nameLable];
    [_nameLable mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.mas_equalTo(self).with.offset(screenScale(22));
        make.left.mas_equalTo(self).with.offset(screenScale(60));
        
        
    }];
    
    _leftImg = [[UIImageView alloc]init];
    _leftImg.image = [UIImage imageNamed:@"coin_large_icon"];
    [self addSubview:_leftImg];
    [_leftImg mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.mas_equalTo(self).with.offset(screenScale(15));
        make.left.mas_equalTo(self).with.offset(screenScale(15));
        make.width.mas_equalTo(screenScale(30));
        make.height.mas_equalTo(screenScale(30));
    }];
    
    _textLable = [[UILabel alloc]init];
    _textLable.text = @"¥10";
    _textLable.layer.cornerRadius = screenScale(5);
    _textLable.backgroundColor = getColor(@"3a95ff");
    _textLable.textColor = getColor(@"ffffff");
    _textLable.textAlignment = NSTextAlignmentCenter;
    _textLable.font = get4sFont(12);
    [self addSubview:_textLable];
    [_textLable mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.mas_equalTo(self).with.offset(screenScale(18));
        make.right.mas_equalTo(self).with.offset(screenScale(-15));
        make.width.mas_equalTo(screenScale(60));
        make.height.mas_equalTo(screenScale(24));
    }];
    
    _threadView = [[UIView alloc]init];
    _threadView.backgroundColor = getColor(@"eeeeee");
    [self addSubview:_threadView];
    [_threadView mas_makeConstraints:^(MASConstraintMaker *make) {
        make.bottom.mas_equalTo(self).with.offset(0);
        make.left.mas_equalTo(self).with.offset(screenScale(15));
        make.width.mas_equalTo(scrWidth() - screenScale(15));
        make.height.mas_equalTo(screenScale(1));
    }];
}

@end
